﻿using System;
using System.Threading.Tasks;

namespace CsharpTool.SignalRServer
{
    /// <summary>
    /// 消息接收
    /// </summary>
    public interface IMessageReceive<in TReceviceData> : IDisposable
    {
        /// <summary>
        /// 连接状态改变
        /// </summary>
        Task ConnectionChangeAsync(ConnectionInfo connectionInfo);

        /// <summary>
        /// 接收消息
        /// </summary>
        Task ReceiveMsgAsync(string connectionId, TReceviceData msg);
    }
}
